Aggregating plug-in requests for improved client performance

ABSTRACT

In one embodiment, computer-readable instructions, when executed, cause a client browser to wait for all of the markup language in a document object model to be loaded, and upon loading, parse the document object model for supported tags, create placeholder frames for each supported tag, and bundle all the tags into a single meta-request for a server. Upon receiving each response, the instructions are further operable to cause the client browser to replace the hidden frames with its corresponding response, thereby reducing the number of socket connections from the client to the server.

PRIORITY

This application is a continuation under 35 U.S.C. §120 of U.S. patentapplication Ser. No. 13/211,213, filed 16 Aug. 2011.

TECHNICAL FIELD

The present disclosure relates generally to aggregating multiple plug-inrequests on a web page and to handling the placement of contentassociated by a response by a server.

BACKGROUND

A social networking system, such as a social networking website, enablesits users to interact with it and with each other through the system.The social networking system may create and store a record, oftenreferred to as a user profile, in connection with the user. The userprofile may include a user's demographic information, communicationchannel information, and personal interest. The social networking systemmay also create and store a record of a user's relationship with otherusers in the social networking system (e.g., social graph), as well asprovide services (e.g., wall-posts, photo-sharing, or instant messaging)to facilitate social interaction between users in the social networkingsystem.

The social networking system may provide plug-ins to developers ofthird-party web sites, that allow the developers to leverage socialnetworking assets, such as log-in information and friend lists, orpermit actions on the social networking system by selecting elements onthe third-party website.

SUMMARY

Particular embodiments relate to a script residing on the third-partyweb site that aggregates all calls to the social networking system intoa single request in order to enhance responsiveness. These and otherfeatures, aspects, and advantages of the disclosure are described inmore detail below in the detailed description and in conjunction withthe following figures.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example social networking system.

FIG. 2 illustrates an example web page containing social-networkingplug-ins.

FIG. 3 illustrates an example markup language of a webpage using aseparate inline frame for each plug-in.

FIG. 4 illustrates an example method of aggregating social networkingplug-in requests.

FIG. 5 illustrates an example markup language of a webpage aggregatingsocial networking plug-in request into a single inline frame.

FIG. 6 illustrates an example network environment.

FIG. 7 illustrates an example computer system.

DETAILED DESCRIPTION

The invention is now described in detail with reference to a fewembodiments thereof as illustrated in the accompanying drawings. In thefollowing description, numerous specific details are set forth in orderto provide a thorough understanding of the present disclosure. It isapparent, however, to one skilled in the art, that the presentdisclosure may be practiced without some or all of these specificdetails. In other instances, well known process steps and/or structureshave not been described in detail in order not to unnecessarily obscurethe present disclosure. In addition, while the disclosure is describedin conjunction with the particular embodiments, it should be understoodthat this description is not intended to limit the disclosure to thedescribed embodiments. To the contrary, the description is intended tocover alternatives, modifications, and equivalents as may be includedwithin the spirit and scope of the disclosure as defined by the appendedclaims.

A social networking system, such as a social networking website, enablesits users to interact with it, and with each other through, the system.Typically, to become a registered user of a social networking system, anentity, either human or non-human, registers for an account with thesocial networking system. Thereafter, the registered user may log intothe social networking system via an account by providing, for example, acorrect login ID or username and password. As used herein, a “user” maybe an individual (human user), an entity (e.g., an enterprise, business,or third party application), or a group (e.g., of individuals orentities) that interacts or communicates with or over such a socialnetwork environment.

When a user registers for an account with a social networking system,the social networking system may create and store a record, oftenreferred to as a “user profile”, in connection with the user. The userprofile may include information provided by the user and informationgathered by various systems, including the social networking system,relating to activities or actions of the user. For example, the user mayprovide his name, profile picture, contact information, birth date,gender, marital status, family status, employment, education background,preferences, interests, and other demographical information to beincluded in his user profile. The user may identify other users of thesocial networking system that the user considers to be his friends. Alist of the user's friends or first degree contacts may be included inthe user's profile. Connections in social networking systems may be inboth directions or may be in just one direction. For example, if Bob andJoe are both users and connect with each another, Bob and Joe are eachconnections of the other. If, on the other hand, Bob wishes to connectto Sam to view Sam's posted content items, but Sam does not choose toconnect to Bob, a one-way connection may be formed where Sam is Bob'sconnection, but Bob is not Sam's connection. Some embodiments of asocial networking system allow the connection to be indirect via one ormore levels of connections (e.g., friends of friends). Connections maybe added explicitly by a user, for example, the user selecting aparticular other user to be a friend, or automatically created by thesocial networking system based on common characteristics of the users(e.g., users who are alumni of the same educational institution). Theuser may identify or bookmark websites or web pages he visits frequentlyand these websites or web pages may be included in the user's profile.

The user may provide information relating to various aspects of the user(such as contact information and interests) at the time the userregisters for an account or at a later time. The user may also updatehis or her profile information at any time. For example, when the usermoves, or changes a phone number, he may update his contact information.Additionally, the user's interests may change as time passes, and theuser may update his interests in his profile from time to time. A user'sactivities on the social networking system, such as frequency ofaccessing particular information on the system, may also provideinformation that may be included in the user's profile. Again, suchinformation may be updated from time to time to reflect the user'smost-recent activities. Still further, other users or so-called friendsor contacts of the user may also perform activities that affect or causeupdates to a user's profile. For example, a contact may add the user asa friend (or remove the user as a friend). A contact may also writemessages to the user's profile pages—typically known as wall-posts. Auser may also input status messages that get posted to the user'sprofile page.

A social network system may maintain social graph information, which cangenerally model the relationships among groups of individuals, and mayinclude relationships ranging from casual acquaintances to closefamilial bonds. A social network may be represented using a graphstructure. Each node of the graph corresponds to a member of the socialnetwork. Edges connecting two nodes represent a relationship between twousers. In addition, the degree of separation between any two nodes isdefined as the minimum number of hops required to traverse the graphfrom one node to the other. A degree of separation between two users canbe considered a measure of relatedness between the two users representedby the nodes in the graph.

A social networking system may support a variety of applications, suchas photo sharing, on-line calendars and events. For example, the socialnetworking system may also include media sharing capabilities. Forexample, the social networking system may allow users to postphotographs and other multimedia files to a user's profile, such as in awall post or in a photo album, both of which may be accessible to otherusers of the social networking system. Social networking system may alsoallow users to configure events. For example, a first user may configurean event with attributes including time and date of the event, locationof the event and other users invited to the event. The invited users mayreceive invitations to the event and respond (such as by accepting theinvitation or declining it). Furthermore, social networking system mayallow users to maintain a personal calendar. Similarly to events, thecalendar entries may include times, dates, locations and identities ofother users.

The social networking system may also support a privacy model. A usermay or may not wish to share his information with other users orthird-party applications, or a user may wish to share his informationonly with specific users or third-party applications. A user may controlwhether his information is shared with other users or third-partyapplications through privacy settings associated with his user profile.For example, a user may select a privacy setting for each user datumassociated with the user and/or select settings that apply globally orto categories or types of user profile information. A privacy settingdefines, or identifies, the set of entities (e.g., other users,connections of the user, friends of friends, or third party application)that may have access to the user datum. The privacy setting may bespecified on various levels of granularity, such as by specifyingparticular entities in the social network (e.g., other users),predefined groups of the user's connections, a particular type ofconnections, all of the user's connections, all first-degree connectionsof the user's connections, the entire social network, or even the entireInternet (e.g., to make the posted content item index-able andsearchable on the Internet). A user may choose a default privacy settingfor all user data that is to be posted. Additionally, a user mayspecifically exclude certain entities from viewing a user datum or aparticular type of user data.

A social networking system may support a news feed service. A news feedis a data format typically used for providing users with frequentlyupdated content. A social networking system may provide various newsfeeds to its users, where each news feed includes content relating to aspecific subject matter or topic, and/or other users. Various pieces ofcontent may be aggregated into a single news feed. In someimplementations, a social networking system may provide a news feed thatincludes selected entries corresponding to activities of a user'sfirst-degree contacts and/or pages or topics that a user has indicatedan interest. Individual users of the social networking system maysubscribe to specific news fees of their interest. U.S. Pat. No.7,669,123, incorporated by reference in its entirety for all purposes,describes a system that can be used to dynamically provide a news feed.A group of related actions may be presented together to a user of thesocial networking system in the same news feed. For example, a news feedconcerning the event organized through the social networking system mayinclude information about the event, such as its time, location, andattendees, and photos taken at the event, which have been uploaded tothe social networking system. U.S. application Ser. No. 12/884,010,incorporated by reference in its entirety for all purposes, describes asystem that can be used to construct a news feed comprising relatedactions and present the news feed to a user of the social networkingsystem.

FIG. 1 illustrates an example social networking system. In particularembodiments, the social networking system may store user profile dataand social graph information in user profile database 101. In particularembodiments, the social networking system may store user event data inevent database 102. For example, a user may register a new event byaccessing a client application to define an event name, a time and alocation, and cause the newly created event to be stored in eventdatabase 102. In particular embodiments, the social networking systemmay store user privacy policy data in privacy policy database 103. Inparticular embodiments, the social networking system may store mediadata (e.g., photos, or video clips) in media database 104. In particularembodiments, databases 101, 102, 103, and 104 may be operably connectedto the social networking system's front end 120 and news feed engine110. In particular embodiments, the front end 120 may interact withclient device 122 through network cloud 121. Client device 122 isgenerally a computer or computing device including functionality forcommunicating (e.g., remotely) over a computer network. Client device122 may be a desktop computer, laptop computer, personal digitalassistant (PDA), in- or out-of-car navigation system, smart phone orother cellular or mobile phone, or mobile gaming device, among othersuitable computing devices. Client device 122 may execute one or moreclient applications, such as a web browser (e.g., Microsoft WindowsInternet Explorer, Mozilla Firefox, Apple Safari, Google Chrome, andOpera, etc.) or special-purpose client application (e.g., Facebook foriPhone, etc.), to access and view content over a computer network. Frontend 120 may include web or HTTP server functionality, as well as otherfunctionality, to allow users to access the social networking system.Network cloud 121 generally represents a network or collection ofnetworks (such as the Internet or a corporate intranet, or a combinationof both) over which client devices 122 may access the social networksystem.

In particular embodiments, a user of the social networking system mayupload one or more media files to media database 104. For example, auser can upload a photo or a set of photos (often called a photo album),or a video clip to media database 105 from a client device 122 (e.g., acomputer, or a camera phone). In particular embodiments, the one or moremedia files may contain metadata (often called “tags”) associated witheach media file. For example, a photo shot by a digital camera maycontain metadata relating to file size, resolution, time stamp, name ofthe camera maker, and/or location (e.g., GPS) coordinates. A user canadd additional metadata values to a photo, or tag a photo, during anupload process. Some examples of tags of a media file are author, title,comments, event names, time, location, names of people appearing in themedia file, or user comment. In particular embodiments, a user may tag amedia file by using a client application (e.g., a photo or videoeditor), or entering one or more tags in a graphical user interface of amedia uploading tool that uploads a user's one or more media files froma client device 122 to the social networking system. A user may also taga media file after an upload at a later time in the social networkingsystem's web site. In particular embodiments, the social networkingsystem may also extract metadata from a media file and store themetadata in media database 104.

In particular embodiments, news feed engine 110 may access user profiledatabase 101, event database 102, and media database 104 for data abouta particular user of the social networking system, and assemble a listof one or more activities as news items for a user or a set of users. Inparticular embodiments, news feed engine 110 may access privacy policydatabase 103 and determines a subset of news items based on one or moreprivacy settings. In particular embodiments, news feed engine 110 maycompile a dynamic list of a limited number of news items in a ranked orsorted order. In particular embodiments, news feed engine 110 mayprovide links related to one or more activities in the news items, andlinks providing opportunities to participate in the activities. Forexample, a news feed can comprise wall posts, status updates, comments,and recent check-ins to a place (with a link to a web page of theplace).

In other embodiments, news feed engine 110 may access user profiledatabase 101, event database 102, and media database 104 and compile adynamic list of a limited number of news items about a group of relatedactions received from users of the social networking system (i.e., anews feed). For example, a news feed can comprise an event that a usermay schedule and organize through the social networking system (with alink to participate the event), messages about the event posted by theuser and other participants of the event, and photos of the eventuploaded by the user and other participants of the event.

Users of a social networking system can access other websites or thirdparty websites (e.g., ESPN.com, www.youtube.com). In particularembodiments, a user using client device 122 may connect to andcommunicate with third party website 130 through network cloud 121.Third party website 130 may comprise web server 131 operativelyconnected to one or more data stores 132 storing user data and web pageinformation. User data may include, for example, user name, user profilepicture, and user profile information (e.g., location, affiliation,interest). Web page information may include, for example, page layoutinformation, scripts, web page content such as text (e.g., ASCII orHTML), media data (e.g., graphics, photos, video clips), and executablecode objects (e.g., a game executable within a browser window or frame).In particular embodiments, a user may use a web browser orspecial-purpose client application hosted on client device 122 to accesstheir party website 130 by sending an HTTP request to web server 131,causing web server 131 to access the one or more data stores 132 andconstruct one or more web pages or frames displayed in the web browseror the special-purpose client application.

A social networking system may communicate and access third partywebsite 130, and vise versa, through network cloud 121. For example, aweb page constructed by third party website 130 for a user of a socialnetworking system can contain information from the social networkingsystem, such as a frame displaying profile pictures of the user'sfirst-degree friends who are currently active on third party website130. For example, a user's user profile page of a social networkingsystem can contain an embedded video clip that the user posted on thirdparty website 130. In some embodiments, a web page constructed by afirst web site may include one or more inline references that cause theclient device 122 to access and display content from a second website byincorporating in the web page's HTML document Uniform Resource Locations(URLs) and/or script code (e.g., JavaScript, PHP, AJAX) that causes aclient application hosted on the client device 122 to access the secondwebsite to dynamically provide content specified by the script code(e.g., profile pictures). In some embodiments, a browser cookieinstalled by a second website on client device 122 can be used tofacilitate accessing the second website. For example, requeststransmitted to the social networking system for a particular user mayinclude a browser cookie or other token to enable automaticauthentication and access to the social networking system for theparticular user (e.g., to access and display profile pictures of theparticular user's first-degree friends), without the particular userhaving to manually enter user ID and password information of the socialnetworking system.

In particular embodiments, the social networking system may provideapplication programming interfaces (APIs) that allow developers ofthird-party websites to access user information or social graphinformation from the social networking system, or permit specificactions on the social networking system through the third-party website.These plug-ins, or “widgets,” may be developed by the social networkingsystem owners and provided to developers of third-party sites as “drop”in blocks of code or scripts that they may easily integrate with theirwebsites. As an added benefit of providing these plug-ins, the socialnetworking system becomes aware of what website particular users arevisiting, thereby building a more complete profile of a particular userin order to target advertising and deliver personalized content to theuser. So long as a particular user is concurrently logged into thesocial networking system, merely visiting a third-party page containingany social networking plug-ins gives the social networking system enoughinformation to associate the external page view with a particular useraccount. In particular embodiments, this browsing history tracking isachieved by matching originating IP addresses. In particularembodiments, the historical browsing history for a user is storedindefinitely for future mining and analysis.

FIG. 2 illustrates an example web page having social networking plug-insor “widgets.” FIG. 2 depicts website 200, in this case, “ESPN.com”having a plurality of plug-ins or “widgets.” For example, login 202allows a user to sign in with his or her social networking credentials.In particular embodiments, certain web pages require users create anaccount in order to access particular content. For example, one may haveto register to “ESPN Insider” to access certain content. Theregistration process is generally arduous, and requires information thatthe user has already entered when registering for the social networkingsystem (e.g., name, address, email address, contact information,interests, and the like). In order to enhance the user experience andspare the users the arduous registration process, social networkingsystem may provide third-party web developers a widget that allows themto pull this information easily from the social networking system.Third-party website developer may insert the code for this widget intothe markup language for a given page, which results in the user browserrendering login element 202. Login element 202, as stated, allows a userto utilize his or her social networking credentials, and the informationstored in his or her profile, to quickly register for an account onthird-party website 202.

In particular embodiments, third-party website 200 may include buttons201 a and 201 b that, when activated, perform actions on the socialnetworking system. For example, third-party website 200 maintains itsown content 201. However, a particular user may wish to express hisaffinity for content 201 by “liking” it. Typically, users may only“like” elements that exist on the social network themselves, or elementsthat are represented on the social network, such as a newsfeed story.However, by providing a “like” widget to third-party developers, usersmay “like” objects that exist off the social network; upon clickingbutton 201 a, a newsfeed story will appear on the user's wall indicatinghe “liked” content 201. In particular embodiments, the newsfeed storyalso links to content 201. In particular embodiments, “share” button 201b allows the user to immediately post content 201 on his or her wallfrom a third-party website.

In particular embodiments, the social networking system permitsthird-party servers to access its historical database of browsinghistory for a plurality of users. For example, activity feed 205 maydisplay the stories or content read by the friends of a viewing user.When a user visits website 200, a plug-in generating activity feed 205queries the user's social graph and the social networking system'sbrowsing history to determine which friends of the user have recentlyviewed website 200, and what content they have viewed. In particularembodiments, activity feed 205 includes stories that friends of theviewing user have shared, liked, commented on, or otherwise interactedwith. In particular embodiments, engaged content or stories (i.e.,content that has been interacted with through liking or sharing, etc.)is more highly ranked in activity feed area 205 than stories or contentthat have merely been viewed. In particular embodiments, certain popularwebsites, such as Yelp!, may be pre-approved to query all user data fromthe social networking system to personalize website 200 for the visitinguser.

In particular embodiments, third-party website 200 may include an“action” button 203, which permits other actions on the social network.In the example of FIG. 2, selecting action button 203 immediately makesthe user a “fan” of the node associated with ESPN.com on the socialnetworking system. In particular embodiments, activity button 203 mayintegrate with other applications on the social networking system. Forexample, a user may have a particular application that shares his or herconcert lineup on their wall. The concert lineup may be displayed on theconcert organizer's page, with a “add to my line-up” button for eachact. Selecting this button would automatically add the performance tothe user's lineup and generate a newsfeed story conveying the same. Inparticular embodiments, these applications may be pre-approved andinstalled on the user's social networking profile when they click actionbutton 203. This disclosure contemplates any manner of on-network socialnetworking activities actuated by action button 203.

In particular embodiments, third-party website 200 may include a “buynow” button generated by a payment plug-in. In such embodiments, a usermay wish to enter payment information, such as credit card number,shipping and billing address, expiration date, and the like, so that heor she may utilize “one-click” shopping on a third-party website withouthaving to register for the third-party website's payment processingsystem. In such a manner, the user's experience is greatly simplified,and the social networking system gains another insight into the users'habits (in this case, what products the user purchases) for furtherdelivery of personalized content.

Other social plug-ins allow users to send content to other users, viewthe comments on any piece of content, push recommendations to theviewing user, display profile pictures of the friends of the visitinguser, and the like. This disclosure contemplates any manner of socialplug-in or widget for retrieving information from a social networkingsystem from a third-party site, or, alternatively, delivering content oractions to the social networking system.

FIG. 3 illustrates example pseudo markup language code representing anexample third-party website 130 having social plug-ins. In particularembodiments, web server 131 of third party website 130 may include instructured documents transmitted to client applications HTML or othercode objects that cause the client applications to transmit requests tothe social networking system. The request causes the social networkingsystem to delivery the requested content to the client.

301 includes a block of pseudo-code that initializes the markup languagepage, including the head of the HTML or other markup language page aswell as the body. Code segment 302 loads a JavaScript library providedby the social networking system. In particular embodiments, this may behosted by the social networking system (as seen in 302, it is hosted ata social networking server). In particular embodiments, it may be storedon web server 131. Once the JavaScript library is loaded, the browser ofany site visiting the page will execute the JavaScript calls to makerequests to the social networking system.

For example, registration widget 304, like widget 305, and activity feedwidget 306 all utilize JavaScript calls from the JavaScript libraryloaded in code segment 302. In particular embodiments, each JavaScriptcall creates a separate inline frame (iframe) in the document thatretrieves the widget from a server from the social networking system.For example, code segment 304 generates an iframe and requests the name,birthday, gender, location, and email address from the social networkfor a visiting user for the purposes of registration. Similarly codesegment 305 generates an iframe and requests a “like” button for theurl: “http://espn.go.com” from the social networking system. Finally,code segment 306 generates an iframe and requests the recent activity offriends of the visiting user for the same URL. In particularembodiments, each iframe retrieves its content from an external site onthe social networking domain. For example, iframe 304 may be replacedwith fb.com/plugins/like?name_birthday_gender_location_email. Similarly,the iframe for activity widget 306 may render the resource fromfb.com/plugins/activity? (with the various parameters appearing afterthe “?” in the URL. Finally, the browser may render iframe 305 asfb.com/plugins/like?[parameters]. This disclosure contemplates anymanner of retrieving plug in content.

In particular embodiments, a JavaScript library does not have to beloaded. For example, pseudo-code segment 303 performs the same functionas code segment 304, however it lacks any calls to a specializedJavaScript library provided by the social network. Code segment 303creates an iframe from the source URL, which pulls the registrationelement from the social networking system's servers for rendering intothe website. Code segment 307 provides terminators for the web page forproper browser rendering.

The foregoing iframes each constitute a separate connection from thevisiting user's browser to the social networking system servers. Thus,in the example of FIG. 3, 4 socket requests would be made from theclient browser to the servers of the social networking system. Inparticular embodiments, where the third-party developer has a largenumber of social networking widgets, the number of TCP socketconnections may become excessive, subsequently causing long load timesand general unresponsiveness for the visiting user. A large number ofseparate iframe elements resulting in concurrent TCP connections mayalso be browser limited. For example, the Google Chrome browser permits11 concurrent connections to the same domain, while older browsers, suchas Internet Explorer 6, allowed as few as two concurrent TCP connectionsto the same domain. The current version of Internet Explorer 8.0 allowsup to 6 parallel HTTP 1.0/1.1 connections to the same domain. Thus, alarge number of separate iframes may result in slow or incorrectrendering, or page incompatibility across browser platforms.

The present invention remedies this shortcoming by aggregating multiplerequests to the social networking system into a single iframe. FIG. 4illustrates an example method of aggregating multiple requests frommultiple social networking widgets or plug-ins. At Step 401, the clientbrowser, executing a block of JavaScript code, awaits the generation ofa document object model (DOM) by the client browser. As well-known inthe art, the browser layout engine parses HTML into a DOM. In particularembodiments, the browser waits for a triggering event, such as theDOMContentLoaded event. The DOMContentLoaded event fires when parsing ofthe current page is complete, including the underlying markup languagebut excluding actual content such as images and movies, whereas the loadevent fires when all files have finished loading from all resources,including ads and images.

Upon detection of the DOMContentLoaded event, the client browser at Step402 identifies the supported tags in the DOM. In particular embodiments,the tags are JavaScript calls such as <fb:like> or <fb:registration>. Inparticular embodiments, the tags are a particular custom markuplanguage, such as FBML or XFBML. In particular embodiments, nonJavaScript social plug-ins, such as registration iframe 303 are notaggregated with the JavaScript calls (such as 304, 305, and 306 in FIG.3) and are rendered as their own iframe. Although this disclosuredescribes detecting supported tags, this disclosure contemplates anysuitable method of requesting a plug-in or content from a third-partysite. For example, a third-party site may utilize the ‘div’ HTML tagwith one or more particular CSS class names to signal plug-ins to beloaded without using special tags. After searching the DOM for supportedtags, the process proceeds to Step 403.

At Step 403, the script instructs the client browser to generateplaceholder iframes for each of the identified supported tags. Becausethe supported tags are traditionally rendered as visible iframes, thesocial networking plug-ins or widgets must still own the space in thewebpage. The script generates placeholder iframes to occupy the requiredspaces on the webpage. In particular embodiments, the placeholderiframes are generated with the same dimensions as the dimensionsrequested by the supported tag. In particular embodiments, the iframemay be dynamically resized. In particular embodiments, the placeholderiframe is an empty iframe hosted by the social networking system. Inparticular embodiments, the empty iframe is hosted by a third partyhosting solution. For example, the script may generate the placeholderby inserting the following pseudo-code:

<iframe src=“http://akamai.fb.com/empty”>

In particular embodiments, the placeholder iframe may be cached on theclient browser in order to improve responsiveness and overall sitespeed. In particular embodiments, each placeholder iframe is assigned aunique name or identifier. In particular embodiments, the names oridentifiers are random strings. In particular embodiments, the iframename or identifier is inserted into the iframe name attribute. Forexample, the JavaScript may cause the client browser to convert “like”widget 305 into: <iframe src=“akamai.fb.com/empty” name=“JBv5O”>.

At Step 404 the script causes the client's browser to package all thetags into a single meta-request by generating a hidden iframe containingall the identified tags. In particular embodiments, the hidden iframecontaining all the tags is fully self-contained; as each widget isdelivered, the browser may render the widget into the correct position;i.e., the position of its corresponding placeholder iframe. The hiddeniframe includes a bundle of all the parameters of the plug-in requestscontained in the visible iframes for transmission to the socialnetworking server. As previously discussed, each supported tag (visibleiframe) has its own set of parameters to be sent to the server. Forexample, referring back to FIG. 3, iframe 304 includes the parameters(“name, birthday, gender, location, email”) and a width parameter. Asanother example, iframe 305, the “like” button has a parameter for theURL (espn.go.com) as well as show faces=“true.” Finally, iframe 306, theactivity feed widget, has parameters dictating border color andrecommendations=“false.” Thus, each set of parameters is specific to theplug-in itself, and the hidden iframe contains all the parameters parsedfrom the supported tags.

The hidden iframe also contains, for each set of parameters, the uniqueidentifier of its corresponding placeholder iframe. Therefore, thesocial networking server may associate each response with thecorresponding iframe in which it is to be rendered. In particularembodiments, the browser security model allows communication between alliframes having the same top-level domain. Thus, the hidden iframe servesas a transport pipe that may facilitates communication between thesocial networking server and each iframe, as well as between eachiframe, via the name attribute tags.

At Step 405, the JavaScript object, when executed by the client'sbrowser, transmits the packaged requests to one or more servers of thesocial networking system. In particular embodiments, the requestincludes the script calls for the various tags, the parameters for eachtag, and the name of its corresponding placeholder iframe.

At Step 406, the JavaScript object handles responses from the server.Each response is received from the server independently and whenever theserver is ready; there is no aggregation on the server side. From theserver's perspective, it first unbundles the bundle of requests, and,for each iframe, renders the assets required by each iframe one-by-one.The server transmits the assets to the client as soon as they arerendered, and the assets may replace the placeholder iframesprogressively. The server transmits the responses progressively bywriting to the open socket as part of the HTTP response. In particularembodiments, the responses are all tagged with a <script> tag, so thatthe client may render the iframes independently of each other. Theclient uses the name in the response as a lookup for the placeholderiframes, and injects the result into the empty frame.

FIG. 5 depicts the response that may be delivered from the server. Codesegment 501 includes the hidden iframe and the first script response; inthis case, the “like” widget. The window.parent.frames command merelyidentifies that the output should be placed into the placeholder iframehaving the same name as the random string assigned to the “like” button.Upon receiving the render assets, the browser makes the JavaScriptfunction call, for example, “OnWidgetArrive( )”, which actuallyunpackages the render assets and renders the widget into the placeholderiframe. In particular embodiments, the OnWidgetArrive( ) function isdefined in the page for the placeholder iframe, or empty shell page.

In some implementations, the render assets are packaged in a JavaScriptObject Notation (JSON) object. In particular embodiments, the JSONencoded object includes all the HTML, JavaScript, and other assetsneeded to populate and render the iframe. In particular embodiments, theJSON object includes a cascading style sheet (CSS), HTML, andJavascript. In particular embodiments, the JSON object dictates theorder in which the CSS, HTML, and JavaScript are loaded. In particularembodiments, CSS is loaded first, followed by HTML, and finallyJavaScript. Although this disclosure describes a response packaged as aJSON object, this disclosure contemplates any method of delivering aresponse. For example, in particular embodiments, the response isembedded in another invisible HTML tag, and JavaScript is utilized topull the content from the HTML object. This disclosure contemplates anysuitable mechanism of delivering a dedicated object to the clientbrowser in response to a plug-in request.

While the foregoing embodiments may be implemented in a variety ofnetwork configurations, the following illustrates an example networkenvironment for didactic, and not limiting, purposes. FIG. 6 illustratesan example network environment 600. Network environment 600 includes anetwork 610 coupling one or more servers 620 and one or more clients 630to each other. Network environment 600 also includes one or more datastorage 640 linked to one or more servers 620. Particular embodimentsmay be implemented in network environment 600. For example, socialnetworking system frontend 120 may be written in software programshosted by one or more servers 620. For example, event database 102 maybe stored in one or more storage 640. In particular embodiments, network610 is an intranet, an extranet, a virtual private network (VPN), alocal area network (LAN), a wireless LAN (WLAN), a wide area network(WAN), a metropolitan area network (MAN), a portion of the Internet, oranother network 610 or a combination of two or more such networks 610.The present disclosure contemplates any suitable network 610.

One or more links 650 couple a server 620 or a client 630 to network610. In particular embodiments, one or more links 650 each includes oneor more wired, wireless, or optical links 650. In particularembodiments, one or more links 650 each includes an intranet, anextranet, a VPN, a LAN, a WLAN, a WAN, a MAN, a portion of the Internet,or another link 650 or a combination of two or more such links 650. Thepresent disclosure contemplates any suitable links 650 coupling servers620 and clients 630 to network 610.

In particular embodiments, each server 620 may be a unitary server ormay be a distributed server spanning multiple computers or multipledatacenters. Servers 620 may be of various types, such as, for exampleand without limitation, web server, news server, mail server, messageserver, advertising server, file server, application server, exchangeserver, database server, or proxy server. In particular embodiments,each server 620 may include hardware, software, or embedded logiccomponents or a combination of two or more such components for carryingout the appropriate functionalities implemented or supported by server620. For example, a web server is generally capable of hosting websitescontaining web pages or particular elements of web pages. Morespecifically, a web server may host HTML files or other file types, ormay dynamically create or constitute files upon a request, andcommunicate them to clients 630 in response to HTTP or other requestsfrom clients 630. A mail server is generally capable of providingelectronic mail services to various clients 630. A database server isgenerally capable of providing an interface for managing data stored inone or more data stores.

In particular embodiments, one or more data storages 640 may becommunicatively linked to one or more servers 620 via one or more links650. In particular embodiments, data storages 640 may be used to storevarious types of information. In particular embodiments, the informationstored in data storages 640 may be organized according to specific datastructures. In particular embodiment, each data storage 640 may be arelational database. Particular embodiments may provide interfaces thatenable servers 620 or clients 630 to manage, e.g., retrieve, modify,add, or delete, the information stored in data storage 640.

In particular embodiments, each client 630 may be an electronic deviceincluding hardware, software, or embedded logic components or acombination of two or more such components and capable of carrying outthe appropriate functions implemented or supported by client 630. Forexample and without limitation, a client 630 may be a desktop computersystem, a notebook computer system, a netbook computer system, ahandheld electronic device, or a mobile telephone. The presentdisclosure contemplates any suitable clients 630. A client 630 mayenable a network user at client 630 to access network 630. A client 630may enable its user to communicate with other users at other clients630.

A client 630 may have a web browser 632, such as MICROSOFT INTERNETEXPLORER, GOOGLE CHROME or MOZILLA FIREFOX, and may have one or moreadd-ons, plug-ins, or other extensions, such as TOOLBAR or YAHOOTOOLBAR. A user at client 630 may enter a Uniform Resource Locator (URL)or other address directing the web browser 632 to a server 620, and theweb browser 632 may generate a Hyper Text Transfer Protocol (HTTP)request and communicate the HTTP request to server 620. Server 620 mayaccept the HTTP request and communicate to client 630 one or more HyperText Markup Language (HTML) files responsive to the HTTP request. Client630 may render a web page based on the HTML files from server 620 forpresentation to the user. The present disclosure contemplates anysuitable web page files. As an example and not by way of limitation, webpages may render from HTML files, Extensible Hyper Text Markup Language(XHTML) files, or Extensible Markup Language (XML) files, according toparticular needs. Such pages may also execute scripts such as, forexample and without limitation, those written in JAVASCRIPT, JAVA,MICROSOFT SILVERLIGHT, combinations of markup language and scripts suchas AJAX (Asynchronous JAVASCRIPT and XML), and the like. Herein,reference to a web page encompasses one or more corresponding web pagefiles (which a browser may use to render the web page) and vice versa,where appropriate.

FIG. 7 illustrates an example computer system 700, which may be usedwith some embodiments of the present invention. This disclosurecontemplates any suitable number of computer systems 700. Thisdisclosure contemplates computer system 700 taking any suitable physicalform. As example and not by way of limitation, computer system 700 maybe an embedded computer system, a system-on-chip (SOC), a single-boardcomputer system (SBC) (such as, for example, a computer-on-module (COM)or system-on-module (SOM)), a desktop computer system, a laptop ornotebook computer system, an interactive kiosk, a mainframe, a mesh ofcomputer systems, a mobile telephone, a personal digital assistant(PDA), a server, or a combination of two or more of these. Whereappropriate, computer system 700 may include one or more computersystems 700; be unitary or distributed; span multiple locations; spanmultiple machines; or reside in a cloud, which may include one or morecloud components in one or more networks. Where appropriate, one or morecomputer systems 700 may perform without substantial spatial or temporallimitation one or more steps of one or more methods described orillustrated herein. As an example and not by way of limitation, one ormore computer systems 700 may perform in real time or in batch mode oneor more steps of one or more methods described or illustrated herein.One or more computer systems 700 may perform at different times or atdifferent locations one or more steps of one or more methods describedor illustrated herein, where appropriate.

In particular embodiments, computer system 700 includes a processor 702,memory 704, storage 706, an input/output (I/O) interface 708, acommunication interface 710, and a bus 712. Although this disclosuredescribes and illustrates a particular computer system having aparticular number of particular components in a particular arrangement,this disclosure contemplates any suitable computer system having anysuitable number of any suitable components in any suitable arrangement.

In particular embodiments, processor 702 includes hardware for executinginstructions, such as those making up a computer program. As an exampleand not by way of limitation, to execute instructions, processor 702 mayretrieve (or fetch) the instructions from an internal register, aninternal cache, memory 704, or storage 706; decode and execute them; andthen write one or more results to an internal register, an internalcache, memory 704, or storage 706. In particular embodiments, processor702 may include one or more internal caches for data, instructions, oraddresses. The present disclosure contemplates processor 702 includingany suitable number of any suitable internal caches, where appropriate.As an example and not by way of limitation, processor 702 may includeone or more instruction caches, one or more data caches, and one or moretranslation look-aside buffers (TLBs). Instructions in the instructioncaches may be copies of instructions in memory 704 or storage 706, andthe instruction caches may speed up retrieval of those instructions byprocessor 702. Data in the data caches may be copies of data in memory704 or storage 706 for instructions executing at processor 702 tooperate on; the results of previous instructions executed at processor702 for access by subsequent instructions executing at processor 702 orfor writing to memory 704 or storage 706; or other suitable data. Thedata caches may speed up read or write operations by processor 702. TheTLBs may speed up virtual-address translation for processor 702. Inparticular embodiments, processor 702 may include one or more internalregisters for data, instructions, or addresses. The present disclosurecontemplates processor 702 including any suitable number of any suitableinternal registers, where appropriate. Where appropriate, processor 702may include one or more arithmetic logic units (ALUs); be a multi-coreprocessor; or include one or more processors 702. Although thisdisclosure describes and illustrates a particular processor, thisdisclosure contemplates any suitable processor.

In particular embodiments, memory 704 includes main memory for storinginstructions for processor 702 to execute or data for processor 702 tooperate on. As an example and not by way of limitation, computer system700 may load instructions from storage 706 or another source (such as,for example, another computer system 700) to memory 704. Processor 702may then load the instructions from memory 704 to an internal registeror internal cache. To execute the instructions, processor 702 mayretrieve the instructions from the internal register or internal cacheand decode them. During or after execution of the instructions,processor 702 may write one or more results (which may be intermediateor final results) to the internal register or internal cache. Processor702 may then write one or more of those results to memory 704. Inparticular embodiments, processor 702 executes only instructions in oneor more internal registers or internal caches or in memory 704 (asopposed to storage 706 or elsewhere) and operates only on data in one ormore internal registers or internal caches or in memory 704 (as opposedto storage 706 or elsewhere). One or more memory buses (which may eachinclude an address bus and a data bus) may couple processor 702 tomemory 704. Bus 712 may include one or more memory buses, as describedbelow. In particular embodiments, one or more memory management units(MMUs) reside between processor 702 and memory 704 and facilitateaccesses to memory 704 requested by processor 702. In particularembodiments, memory 704 includes random access memory (RAM). This RAMmay be volatile memory, where appropriate Where appropriate, this RAMmay be dynamic RAM (DRAM) or static RAM (SRAM). Moreover, whereappropriate, this RAM may be single-ported or multi-ported RAM. Thepresent disclosure contemplates any suitable RAM. Memory 704 may includeone or more memories 702, where appropriate. Although this disclosuredescribes and illustrates particular memory, this disclosurecontemplates any suitable memory.

In particular embodiments, storage 706 includes mass storage for data orinstructions. As an example and not by way of limitation, storage 706may include an HDD, a floppy disk drive, flash memory, an optical disc,a magneto-optical disc, magnetic tape, or a Universal Serial Bus (USB)drive or a combination of two or more of these. Storage 706 may includeremovable or non-removable (or fixed) media, where appropriate. Storage706 may be internal or external to computer system 700, whereappropriate. In particular embodiments, storage 706 is non-volatile,solid-state memory. In particular embodiments, storage 706 includesread-only memory (ROM). Where appropriate, this ROM may bemask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM),electrically erasable PROM (EEPROM), electrically alterable ROM (EAROM),or flash memory or a combination of two or more of these. Thisdisclosure contemplates mass storage 706 taking any suitable physicalform. Storage 706 may include one or more storage control unitsfacilitating communication between processor 702 and storage 706, whereappropriate. Where appropriate, storage 706 may include one or morestorages 706. Although this disclosure describes and illustratesparticular storage, this disclosure contemplates any suitable storage.

In particular embodiments, I/O interface 708 includes hardware,software, or both providing one or more interfaces for communicationbetween computer system 700 and one or more I/O devices. Computer system700 may include one or more of these I/O devices, where appropriate. Oneor more of these I/O devices may enable communication between a personand computer system 700. As an example and not by way of limitation, anI/O device may include a keyboard, keypad, microphone, monitor, mouse,printer, scanner, speaker, still camera, stylus, tablet, touch screen,trackball, video camera, another suitable I/O device or a combination oftwo or more of these. An I/O device may include one or more sensors.This disclosure contemplates any suitable I/O devices and any suitableI/O interfaces 708 for them. Where appropriate, I/O interface 708 mayinclude one or more device or software drivers enabling processor 702 todrive one or more of these I/O devices. I/O interface 708 may includeone or more I/O interfaces 708, where appropriate. Although thisdisclosure describes and illustrates a particular I/O interface, thisdisclosure contemplates any suitable I/O interface.

In particular embodiments, communication interface 710 includeshardware, software, or both providing one or more interfaces forcommunication (such as, for example, packet-based communication) betweencomputer system 700 and one or more other computer systems 700 or one ormore networks. As an example and not by way of limitation, communicationinterface 710 may include a network interface controller (NIC) ornetwork adapter for communicating with an Ethernet or other wire-basednetwork or a wireless NIC (WNIC) or wireless adapter for communicatingwith a wireless network, such as a WI-FI network. This disclosurecontemplates any suitable network and any suitable communicationinterface 710 for it. As an example and not by way of limitation,computer system 700 may communicate with an ad hoc network, a personalarea network (PAN), a local area network (LAN), a wide area network(WAN), a metropolitan area network (MAN), or one or more portions of theInternet or a combination of two or more of these. One or more portionsof one or more of these networks may be wired or wireless. As anexample, computer system 700 may communicate with a wireless PAN (WPAN)(such as, for example, a BLUETOOTH WPAN), a WI-FI network, a WI-MAXnetwork, a cellular telephone network (such as, for example, a GlobalSystem for Mobile Communications (GSM) network), or other suitablewireless network or a combination of two or more of these. Computersystem 700 may include any suitable communication interface 710 for anyof these networks, where appropriate. Communication interface 710 mayinclude one or more communication interfaces 710, where appropriate.Although this disclosure describes and illustrates a particularcommunication interface, this disclosure contemplates any suitablecommunication interface.

In particular embodiments, bus 712 includes hardware, software, or bothcoupling components of computer system 700 to each other. As an exampleand not by way of limitation, bus 712 may include an AcceleratedGraphics Port (AGP) or other graphics bus, an Enhanced Industry StandardArchitecture (EISA) bus, a front-side bus (FSB), a HYPERTRANSPORT (HT)interconnect, an Industry Standard Architecture (ISA) bus, an INFINIBANDinterconnect, a low-pin-count (LPC) bus, a memory bus, a Micro ChannelArchitecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, aPCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA)bus, a Video Electronics Standards Association local (VLB) bus, oranother suitable bus or a combination of two or more of these. Bus 712may include one or more buses 712, where appropriate. Although thisdisclosure describes and illustrates a particular bus, this disclosurecontemplates any suitable bus or interconnect.

Herein, reference to a computer-readable storage medium encompasses oneor more non-transitory, tangible computer-readable storage mediapossessing structure. As an example and not by way of limitation, acomputer-readable storage medium may include a semiconductor-based orother integrated circuit (IC) (such, as for example, afield-programmable gate array (FPGA) or an application-specific IC(ASIC)), a hard disk, an HDD, a hybrid hard drive (HHD), an opticaldisc, an optical disc drive (ODD), a magneto-optical disc, amagneto-optical drive, a floppy disk, a floppy disk drive (FDD),magnetic tape, a holographic storage medium, a solid-state drive (SSD),a RAM-drive, a SECURE DIGITAL card, a SECURE DIGITAL drive, or anothersuitable computer-readable storage medium or a combination of two ormore of these, where appropriate. Herein, reference to acomputer-readable storage medium excludes any medium that is noteligible for patent protection under 35 U.S.C. §101. Herein, referenceto a computer-readable storage medium excludes transitory forms ofsignal transmission (such as a propagating electrical or electromagneticsignal per se) to the extent that they are not eligible for patentprotection under 35 U. S.C. §101.

This disclosure contemplates one or more computer-readable storage mediaimplementing any suitable storage. In particular embodiments, acomputer-readable storage medium implements one or more portions ofprocessor 702 (such as, for example, one or more internal registers orcaches), one or more portions of memory 704, one or more portions ofstorage 706, or a combination of these, where appropriate. In particularembodiments, a computer-readable storage medium implements RAM or ROM.In particular embodiments, a computer-readable storage medium implementsvolatile or persistent memory. In particular embodiments, one or morecomputer-readable storage media embody software. Herein, reference tosoftware may encompass one or more applications, bytecode, one or morecomputer programs, one or more executables, one or more instructions,logic, machine code, one or more scripts, or source code, and viceversa, where appropriate. In particular embodiments, software includesone or more application programming interfaces (APIs). This disclosurecontemplates any suitable software written or otherwise expressed in anysuitable programming language or combination of programming languages.In particular embodiments, software is expressed as source code orobject code. In particular embodiments, software is expressed in ahigher-level programming language, such as, for example, C, Perl, or asuitable extension thereof. In particular embodiments, software isexpressed in a lower-level programming language, such as assemblylanguage (or machine code). In particular embodiments, software isexpressed in JAVA. In particular embodiments, software is expressed inHyper Text Markup Language (HTML), Extensible Markup Language (XML), orother suitable markup language.

The present disclosure encompasses all changes, substitutions,variations, alterations, and modifications to the example embodimentsherein that a person having ordinary skill in the art would comprehend.Similarly, where appropriate, the appended claims encompass all changes,substitutions, variations, alterations, and modifications to the exampleembodiments herein that a person having ordinary skill in the art wouldcomprehend.

What is claimed is:
 1. A method comprising: by one or more computingsystems of a social-networking system, receiving, from a client system,a packaged request comprising: one or more requests to retrieve one ormore dedicated objects, and for each request, an indication of acorresponding placeholder frame; by one or more computing systems of thesocial-networking system, progressively rendering the one or morededicated objects, in response to the packaged request, wherein eachdedicated object is executable on a webpage to access information fromthe social-networking system or to perform an action on thesocial-networking system; and by one or more computing systems of thesocial-networking system, progressively sending one or more responses tothe client system, each response comprising a rendered dedicated objectand a name for a corresponding placeholder frame, wherein each responseis sent in response to the associated dedicated object being rendered.2. The method of claim 1, wherein the indication of a correspondingplaceholder frame comprises a unique identifier of the correspondingplaceholder frame.
 3. The method of claim 1, wherein the wherein thepackage request comprises one or more parameters for each of the one ormore requests to retrieve one or more dedicated objects.
 4. The methodof claim 1, wherein each dedicated object comprises a JSON object. 5.The method of claim 4, wherein each JSON object comprises a CSS file,HTML file, and JavaScript code.
 6. The method of claim 1, wherein theplaceholder frames each comprise a cached asset.
 7. One or morecomputer-readable non-transitory storage media embodying software thatis operable when executed to: receive, from a client system, a packagedrequest comprising: one or more requests to retrieve one or morededicated objects, and for each request, an indication of acorresponding placeholder frame; progressively render the one or morededicated objects, in response to the packaged request, wherein eachdedicated object is executable on a webpage to access information fromthe social-networking system or to perform an action on thesocial-networking system; and progressively send one or more responsesto the client system, each response comprising a rendered dedicatedobject and a name for a corresponding placeholder frame, wherein eachresponse is sent in response to the associated dedicated object beingrendered.
 8. The media of claim 7, wherein the indication of acorresponding placeholder frame comprises a unique identifier of thecorresponding placeholder frame.
 9. The media of claim 7, wherein thewherein the package request comprises one or more parameters for each ofthe one or more requests to retrieve one or more dedicated objects. 10.The media of claim 7, wherein each dedicated object comprises a JSONobject.
 11. The media of claim 10, wherein each JSON object comprises aCSS file, HTML file, and JavaScript code.
 12. The media of claim 7,wherein the placeholder frames each comprise a cached asset.
 13. Asystem comprising: one or more processors; and a memory coupled to theprocessors comprising instructions executable by the processors, theprocessors operable when executing the instructions to: receive, from aclient system, a packaged request comprising: one or more requests toretrieve one or more dedicated objects, and for each request, anindication of a corresponding placeholder frame; progressively renderthe one or more dedicated objects, in response to the packaged request,wherein each dedicated object is executable on a webpage to accessinformation from the social-networking system or to perform an action onthe social-networking system; and progressively send one or moreresponses to the client system, each response comprising a rendereddedicated object and a name for a corresponding placeholder frame,wherein each response is sent in response to the associated dedicatedobject being rendered.
 14. The system of claim 13, wherein theindication of a corresponding placeholder frame comprises a uniqueidentifier of the corresponding placeholder frame.
 15. The system ofclaim 13, wherein the wherein the package request comprises one or moreparameters for each of the one or more requests to retrieve one or morededicated objects.
 16. The system of claim 13, wherein each dedicatedobject comprises a JSON object.
 17. The system of claim 16, wherein eachJSON object comprises a CSS file, HTML file, and JavaScript code. 18.The system of claim 13, wherein the placeholder frames each comprise acached asset.